import {createRouter,createWebHistory} from 'vue-router'
import Login from "@/views/login/login.vue";
import MainView from "@/views/main/MainView.vue";
import HomeView from "@/views/common/HomeView.vue";
import MainView2 from "@/views/common/MainView2.vue";


//定义路由关系
const routes =[
    {path:'/login',name:Login, component:Login},
    {path:'/',name:MainView,component:MainView},
    {path:'/homeView',name:HomeView,component:HomeView, redirect:'/mainView2',children:[
            {path:'/mainView2',name:MainView2, component:MainView2},
        //     子路由就写学生/教师/管理 各有什么功能
        //     先把每个模块的功能(菜单确定下来) 然后画页面 然后做逻辑
        ]},
]


//创建路由器
const router = createRouter({
    history:createWebHistory(),
    routes:routes
})

//导出路由
export default router